package bookManager.operations;

import bookManager.BookDao;

import java.util.Scanner;

public class BorrowOperation implements IOperation {
    @Override
    public void work() {
        System.out.println("请输入要借的图书序号！");
        Scanner scanner = new Scanner(System.in);
        int bookId = scanner.nextInt();

        BookDao bookDao = new BookDao();
        boolean ret = bookDao.borrowBook(bookId);

        if(ret){
            System.out.println("借书成功！");
        }else {
            System.out.println("借书失败！");
        }
    }
}
